package web.filter;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;

@WebFilter("/*")
public class FilterDemo2 implements Filter {

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        System.out.println("filterdemo2 run ....");

        //放行到目标资源
//        System.out.println("filter-req: " + request);
//        System.out.println("filter-resp: " + response);


        chain.doFilter(request,response);

        System.out.println("filterdemo2 back ...");
    }

}
